﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _02添加水电站
{
    public partial class Form1 : Form
    {
        ExcelManage excelmanage;
        public Form1()
        {
            InitializeComponent();
            DataTable DT=new DataTable ();
             excelmanage= new ExcelManage();
            foreach (string  item in excelmanage .TableName )
            {
                textBox1.AppendText(item + "\n");
            }
        
            excelmanage .dataview =this.dataGridView1 ;
            excelmanage.ExcelRead(0);
          
            textBox1.AppendText(dataGridView1 .Rows[0].Cells [1].Value .ToString ());
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            excelmanage.DatagridViewToExcel(dataGridView1);
        }
    }
}
